#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int f1 = 1;
	int f2 = 1;
	int n = 0;
	int sum = 0;
	scanf("%d", &n);
	for (int i = 1; i < n; i++)
	{
		if (n <= 1)
		{
			f2 = 1;
			break;
		}
		else
		{
			sum = f1 + f2;
			f1 = f2;
			f2 = sum;
		}
	}
	printf("%d", f2);
	

	return 0;
}